package top.healthylife.gateway.platform.zd.api.api.querybynum.oldimpl;


import lombok.extern.slf4j.Slf4j;
import top.healthylife.gateway.platform.zd.api.config.SystemConfig;
import top.healthylife.gateway.platform.zd.api.utils.ZdHttpUtil;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import java.net.MalformedURLException;
import java.net.URL;

/**
 * This class was generated by Apache CXF 3.0.1
 * 2017-11-09T17:26:18.158+08:00
 * Generated source version: 3.0.1
 */
@WebServiceClient(name = "WSQueryByNumServiceService",
        wsdlLocation = "http:/localhost:7001/mfrsq_ws/services/queryByNum?wsdl",
        targetNamespace = "https://wsquery.zhongdengwang.org.cn/mfrsq_ws/services/QueryByNumService")
@Slf4j
public class WSQueryByNumServiceService extends Service {

    public final static URL WSDL_LOCATION;

    public final static QName SERVICE = new QName("https://wsquery.zhongdengwang.org.cn/mfrsq_ws/services/QueryByNumService", "WSQueryByNumServiceService");
    public final static QName WSQueryByNumServicePort = new QName("https://wsquery.zhongdengwang.org.cn/mfrsq_ws/services/QueryByNumService", "WSQueryByNumServicePort");

    static {
        URL url = null;
        SystemConfig systemConfig = ZdHttpUtil.systemConfigInfo();
        String urlStr = systemConfig.getWsQueryServerUrl() + "queryByNum?wsdl";
        try {
            url = new URL(urlStr);
        } catch (MalformedURLException e) {
           log.error("Can not initialize the default wsdl from {}",urlStr);
        }
        WSDL_LOCATION = url;
    }

    public WSQueryByNumServiceService(URL wsdlLocation) {
        super(wsdlLocation, SERVICE);
    }

    public WSQueryByNumServiceService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public WSQueryByNumServiceService() {
        super(WSDL_LOCATION, SERVICE);
    }

    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
    //compliant code instead.
    public WSQueryByNumServiceService(WebServiceFeature... features) {
        super(WSDL_LOCATION, SERVICE, features);
    }

    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
    //compliant code instead.
    public WSQueryByNumServiceService(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, SERVICE, features);
    }

    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
    //compliant code instead.
    public WSQueryByNumServiceService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }

    /**
     * @return returns WSQueryByNumService
     */
    @WebEndpoint(name = "WSQueryByNumServicePort")
    public WSQueryByNumService getWSQueryByNumServicePort() {
        return super.getPort(WSQueryByNumServicePort, WSQueryByNumService.class);
    }

    /**
     * @param features A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return returns WSQueryByNumService
     */
    @WebEndpoint(name = "WSQueryByNumServicePort")
    public WSQueryByNumService getWSQueryByNumServicePort(WebServiceFeature... features) {
        return super.getPort(WSQueryByNumServicePort, WSQueryByNumService.class, features);
    }

}
